package com.xzc.refactory.method.replaceMethodWithMethodObject;

public class T2 {
    private final R2 _account;
    private int inputVal;
    private int quantity;
    private int yearToDate;
    private int importantValue1;
    private int importantValue2;
    private int importantValue3;

    public T2(R2 account, int inputValArg, int quantityArg, int yearToDateArg) {
        _account = account;
        inputVal = inputValArg;
        quantity = quantityArg;
        yearToDate = yearToDateArg;
    }

    int compute() {
        int importantValue1 = (inputVal * quantity) + _account.delta();
        int importantValue2 = (inputVal * yearToDate) + 100;
        if ((yearToDate - importantValue1) > 100)
            importantValue2 -= 20;
        int importantValue3 = importantValue2 * 7;
        //and so on.
        return importantValue3 - 2 * importantValue1;
    }
}
